package com.dgut.usermodule.service;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;

import com.dgut.usermodule.entity.Permission;

public interface PermService {
	List<Permission> list();
	Page<Permission> findAll(Specification<Permission> spec,Pageable pageable);
	Permission findOne(Long id);
	boolean save(Permission perm);
	boolean update(Permission perm);
	boolean delete(Long id);
	int authorize(Long userId,Long permId);//授权
	int cacelauthorize(Long userId,Long permId);//撤权
	void reauthorize(Long userId,Long[] permId);
}
